package br.eti.robsonfranca.clf4j.interfaces;



import br.eti.robsonfranca.clf4j.enums.ClearOp;
import br.eti.robsonfranca.clf4j.impl.Color;

public interface Console {
	
	// Set the current cursor position @ x,y
	void gotoxy(int x, int y);
		
	// Get the console width, in characters
	int getWidth();
	
	// Get the console height, in characters
	int getHeight();
	
	// Clear the console using the background color and following Clear Operation
	void clrscr(ClearOp clo);
	
	// Set the foreground color	
	void setForeColor(Color color);
	
	// Set the background color	
	void setBackColor(Color color);

	// Print something on screen (C style)	
	void printf(String format, Object ... args);
	
	// Read text on screen (C style); 	
	String[] scanf(String format);
	
	// Move cursor up, down, left and right n lines
	void moveUp(int n);	
	void moveDown(int n);
	void moveLeft(int n);
	void moveRight(int n);
	
	// Move n lines below, x=1
	void moveNextLine(int n);
	
	// Move n lines before, x=1
	void movePrevLine(int n);
	
	// Save cursor position
	void saveCurPos();
	
	// Restore cursor position
	void restCurPos();
	
	// Scroll console up and down
	void scrollUp(int n);
	void scrollDown(int n);
	
	// Clear line according to the Clear Operation
	void clrLine(ClearOp clo);
	
	// Accepts an ANSI command and calls the specific Console method(s)
	void sendANSI(String command);
	
	void showCursor();
	
	void hideCursor();
	
	char getChar();
		
}
